﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Maticsoft.Common;
using LTP.Accounts.Bus;

namespace dzs.Web.supply
{
    public partial class AddProjectType : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";
            if (this.txtprojectTypeName.Text.Trim().Length == 0)
            {
                strErr += "项目类型不能为空！\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string projectTypeName = this.txtprojectTypeName.Text;

            Maticsoft.Model.projectType model = new Maticsoft.Model.projectType();
            model.projectTypeName = projectTypeName;

            Maticsoft.BLL.projectType bll = new Maticsoft.BLL.projectType();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功！", "AddProjectType.aspx");
        }
    }
}